function Connector () {

 window.Connector = this;

 this.host = "";
 this.connect = function (phpfile, object) {

 	console.log(phpfile)

 	if (arguments.length < 2) {

 		if (arguments.length == 0) alert("please add the filename of the autenticator");
 		if (arguments.length == 1) alert("please add the object data to php");


 	} else {

 	$.ajax({



	type: 'POST',
	url:  this.host + "php/" + phpfile + ".php",
	data: object,
	complete: function () {console.log("complete")},
	error: function () {console.log("error")},
	success: function(data, status, jqxhr) {


		console.log("sucess")

		
		var mystring = data;
		mystring = mystring.replace(/\s+$/g,'');
		$("#debug_text").val($("#debug_text").val() + mystring);
		
		$("body").trigger("conEvent", mystring);
		
		/*
		if (mystring == "yes") {

			$("#loginbox").hide();
			
			
		} else {

			
			$("#loginbox #login").val("");
			$("#loginbox #pass").val("");

		}*/

	}
	  
	});
 	}

 }


}